/**
 * Copyright (c) smartyiliao.com 2016 All Rights Reserved.
 */
package com.skyable.device.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.skyable.common.common.ServiceResult;
import com.skyable.device.entity.DeveloperKey;

import java.util.List;

/**
 * @author GaoYuan
 * @date 2019/11/14 10:20
 * @desc 开发者秘钥接口
 */
public interface IDeveloperKeyService extends IService<DeveloperKey> {
    /**
     * 添加密钥
     * @param domainId
     * @param userName
     * @return
     */
    ServiceResult<Integer> createDeveloperKey(Integer domainId, String userName);

    /**
     * 删除秘钥
     * @param id
     * @return
     */
    ServiceResult<Integer> deleteDeveloperKey(Long id);

    /**
     * 停用秘钥
     * @param id
     * @return
     */
    ServiceResult<Integer> stopDeveloperKey(Long id);

    /**
     * 查询所有秘钥
     * @param domainId
     * @return
     */
    ServiceResult<List<DeveloperKey>> DeveloperKeyFindAll(Integer domainId);

    /**
     * 启用秘钥
     * @param id
     * @return
     */
    ServiceResult<Integer> startDeveloperKey(Long id);

    /**
     * 根据AK查询秘钥
     * @param developerAK
     * @return
     */
    ServiceResult<DeveloperKey> developerKeyQueryByAK(String developerAK);

}
